package vip.liux.backend.adapter.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.liux.application.dots.PagedResultDto;
import vip.liux.backend.application.service.customer.CustomerDto;
import vip.liux.backend.application.service.customer.CustomerService;
import vip.liux.backend.application.service.customer.QueryCustomerDto;

@RestController
@RequestMapping("/api/customer")
public class CustomerController {

    private final CustomerService customerService;

    public CustomerController(CustomerService customerService) {
        this.customerService = customerService;
    }

    @GetMapping
    public PagedResultDto<CustomerDto> pageList(QueryCustomerDto input) {
        return customerService.pageList(input);
    }
}
